package com.bookstore.Service.impl;

import com.bookstore.Domain.Address;
import com.bookstore.Service.AddressService;
import com.bookstore.mapper.AddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 未来
 */
@Service
public class AddressServiceImpl implements AddressService {

    private final AddressMapper addressMapper;

    @Autowired
    public AddressServiceImpl(AddressMapper addressMapper) {
        this.addressMapper = addressMapper;
    }


    @Override
    public boolean saveAddress(Address address) {
        return addressMapper.insert(address)>0;
    }
}
